// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store/index'
//import Mock from '@/mock'

import AtComponents from 'at-ui'
import 'at-ui-style/src/index.scss'
Vue.use(AtComponents)

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
/* eslint-disable no-new */
import fullscreen from 'vue-fullscreen'
Vue.use(fullscreen)

import animated from 'animate.css' // npm install animate.css --save安装，在引入
Vue.use(animated)

import VueDraggableResizable from 'vue-draggable-resizable'
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
Vue.component('vue-draggable-resizable', VueDraggableResizable)

import animate from 'animate.css';
Vue.use(animate)

import VCharts from 'v-charts'
Vue.use(VCharts)

Vue.config.devtools = true;

Vue.filter('dateFormat', (dataStr) => {
  var time = new Date(dataStr);

  function timeAdd0(str) {
    if (str < 10) {
      str = '0' + str;
    }
    return str
  }
  var y = time.getFullYear();
  var m = time.getMonth() + 1;
  var d = time.getDate();
  var h = time.getHours();
  var mm = time.getMinutes();
  var s = time.getSeconds();
  return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
})

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
